package org.streets.database;

/**
 * 
 * @author dzb
 *
 */
public interface SQLConnectionManager {
    /**
     * Gets the active connection for this request, creating it as necessary. When the session is first created, a
     * transaction is started.
     *
     * @return the request's session
     * @see HibernateSessionSource
     */
    SQLConnection getConnection();
    /**
     * Start a new transaction
     */
    void begin();
    /**
     * Commits the current transaction 
     */
    void commit();

    /**
     * Aborts the current transaction, and starts a new transaction to replace it.
     */
    void abort();
}
